package testGameObjects;

import static org.junit.Assert.*;

import org.junit.Before;
import org.junit.Test;

import YAPserver.gameObjects.GameBall;
import YAPserver.gameObjects.Point;
@Deprecated
public class TestBall {
	GameBall myBall;
	
	@Before
	public void setup(){
		myBall = new GameBall(new Point(50,50), Math.PI/2, 3, 5);
	}
	
	@Test
	public void testMovement(){
		String ballCoord;
		String expected;
	
		myBall.setSpeed(2);
		myBall.setAngle(Math.PI/2);
		myBall.move();
		
		ballCoord = myBall.toString();
		expected = "50" + "\t" + "52" + "\t" + "5";
		assertTrue(ballCoord.equals(expected));
		System.out.println(ballCoord);
		System.out.println(expected);
		myBall.move();
		
		ballCoord = myBall.toString();
		expected = "50" + "\t" + "54" + "\t" + "5";
		System.out.println(ballCoord);
		System.out.println(expected);
		assertTrue(ballCoord.equals(expected));
	}
}
